using System;
namespace HelloWorld
{
   public class hello
    {
        public int iNum1;
        private int iNum2;
        protected int iNum3;
        internal int iNum4;
        protected internal int iNum5;


    }

   
    class HelloChildClass:hello
    {
        void m1()
        {

            iNum1 = 10; //Ko loi vi la loai public: dung duoc o tat ca moi noi

            //iNum2 = 20; //Loi vi la loai private: chi dung o lop nao khai bao no

            iNum3 = 30;//Ko loi vi la loai protected: dung duoc o noi nao khai bao no, va o lop con cua no ma thoi

            iNum4 = 40;//Ko loi vi la loai internal: dung o bat ki noi nao trong cung 1 assembly.

            iNum5 = 50; //Ko loi vi la loai protected internal: la tac dung nhu protected hay internal

        }


        void m2()
        {
            hello obj = new hello();
            //obj.iNum3 = 300; //Loi: vi chi dung duoc trong chinh lop khai bao no, dung truc tiep trong lop con , 
                                      //hay boi cac object cua lop con.
            obj.iNum1 = 100;
            obj.iNum4 = 400;
            obj.iNum5 = 500;
        }
    }


    class world
    {
        void m3()
        {
            
            hello obj2 = new hello();
            obj2.iNum1 = 1000;
            obj2.iNum4 = 4000;
            obj2.iNum5 = 5000;
        }
    }
 
}